home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
- Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal lpAppName$, ByVal lpKeyName$, ByVal lpDefault$, ByVal lpReturnedString$, ByVal nSize%, ByVal lpFileName$)
- Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal lpAppName$, ByVal lpKeyName$, ByVal lpString$, ByVal lpFileName$)
- Declare Function SetWindowPos Lib "user" (ByVal h%, ByVal hb%, ByVal X%, ByVal Y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
- ' The above Declare statement must appear on one line.
-
-
- Global Const SWP_NOMOVE = 2
- Global Const SWP_NOSIZE = 1
- Global Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
- Global Const HWND_TOPMOST = -1
- Global Const HWND_NOTOPMOST = -2
-
- Type POINTAPI ' Used for GetCursor - gets mouse location
- X As Integer ' in screen coordinates.
- Y As Integer
- End Type
-
- Type ConvertPOINTAPI ' Used by WM_SYSCOMMAND - converts mouse location.
- xy As Long
- End Type
-
- ' Enter the following Declare statement as one, single line:
- Declare Function Sendmessage Lib "User" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Any) As Long
-
- Declare Sub GetCursorPos Lib "User" (lpPoint As POINTAPI)
-
-
- Global Const WM_LBUTTONUP = &H202
- Global Const WM_SYSCOMMAND = &H112
- Global Const MOUSE_MOVE = &HF012
-
- Global OnTop As Integer
- Global ClockColor As Integer
- Global TimeFormat As Integer
-
- Global SecondsOn As Integer
- Global ColonOn As Integer
- Global OldTime
-
- Sub CenterForm (frmIN As Form)
- Dim iTop, iLeft As Integer
-
- If frmIN.WindowState <> 0 Then Exit Sub
- iTop = (Screen.Height - frmIN.Height) \ 2
- iLeft = (Screen.Width - frmIN.Width) \ 2
-
- If iTop And iLeft Then
- frmIN.Move iLeft, iTop
- End If
- End Sub
-
-